#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project SIM7600CE-REST
@File    : default_router.py
@Author  : Mr.Cai
@Date    : 2024/01/22 21:00
"""
from datetime import datetime
from fastapi.responses import HTMLResponse
from fastapi.templating import Jinja2Templates
from fastapi import APIRouter, Request

router = APIRouter(tags=["默认路由"])

# 模板目录
templates = Jinja2Templates(directory="app/templates")

@router.get("/", response_class=HTMLResponse)
async def index(request: Request):
    """默认首页"""
    return templates.TemplateResponse("index.html", {"request": request})

@router.get("/send-sms", response_class=HTMLResponse)
async def index(request: Request):
    """发送短信页面"""
    return templates.TemplateResponse("send_sms.html", {"request": request})